#!/usr/local/bin/perl
use Image::Magick;

my( $bg, $image, $shadow, $grad, $gradb, $cloned, $x, $pin06, $pin07 );


#my $I = 0;
#my $minI = 0;
#my $maxI = $#ARGV;
#
#for ( $I = $minI; $I <= $maxI; $I++ ) {
# print( "@ARGV[ $I ] \n" );
#}

#if( $maxI < 2 ) {
# die;
#}

$image = Image::Magick->new;
$x = $image->Read( @ARGV[ 0 ] );
#$x = $image->Read( 'a.jpg' );
warn "$x" if "$x";

$x = $image->Set(quality=>"@ARGV[ 1 ]");
warn "$x" if "$x";
$x = $image->Strip();
warn "$x" if "$x";
$x = $image->Write(@ARGV[ 2 ]);
warn "$x" if "$x";

undef  $bg, $image, $shadow, $grad, $gradb, $cloned, $x, $pin06, $pin07;

